//
// Created by livio on 2023/3/5.
//

#ifndef CPPDEMO_IIOOBJECT_H
#define CPPDEMO_IIOOBJECT_H

#include <memory>

#include "Net.h"

class IIOObject : public std::enable_shared_from_this<IIOObject> {
    static_assert(std::is_same<int, int32_t>::value, "int and int32_t must be of the same type.");
public:
    IIOObject() = default;

    virtual  ~IIOObject() = default;

    [[nodiscard]] virtual const SOCKET getFileDescriptor() const = 0;

    virtual void onReadEvent() = 0;

    virtual void onWriteEvent() = 0;
};

#endif //!CPPDEMO_IIOOBJECT_H
